{namespace vh=In2code\Powermail\ViewHelpers}
<f:layout name="Default" />

Show Confirmation Page
{powermail_rte}					Variable is filled with values from RTE in backend (from thx page)
{powermail_all}					Outputs all fields
{marker1}, {firstname}, etc..	Outputs a field
{mail}							Complete Mail Object


<f:section name="main">
	<div class="powermail_confirmation" data-powermail-form="{mail.form.uid}">
		<h4><f:translate key="confirmation_message" /></h4>

		<vh:string.RawAndRemoveXss>
			{powermail_all}
		</vh:string.RawAndRemoveXss>

		<f:comment>
			Link: Back to form
		</f:comment>
		<f:form
				action="form"
				name="field"
				enctype="multipart/form-data"
				additionalAttributes="{vh:Validation.EnableParsleyAndAjax(form: mail.form)}">

			<f:render section="HiddenFields" arguments="{_all}" />

			<f:form.submit value="{f:translate(key: 'confirmation_prev')}" class="powermail_confirmation_form" />
		</f:form>


		<f:comment>
			Link: Submit form
		</f:comment>
		<f:form
				action="create"
				name="field"
				enctype="multipart/form-data"
				additionalAttributes="{vh:Validation.EnableParsleyAndAjax(form: mail.form)}">

			<f:render section="HiddenFields" arguments="{_all}" />

			<f:form.submit value="{f:translate(key: 'confirmation_next')}" class="powermail_confirmation_submit" />
		</f:form>
	</div>
</f:section>



<f:section name="HiddenFields">
	<f:for each="{mail.answers}" as="answer">
		<f:if condition="{vh:Condition.IsArray(val: '{answer.value}')}">
			<f:then>
				<f:for each="{answer.value}" as="subvalue" iteration="i">
					<f:form.hidden property="{answer.field.marker}.{i.index}" value="{subvalue}" />
				</f:for>
			</f:then>
			<f:else>
				<f:form.hidden property="{answer.field.marker}" value="{answer.value}" />
			</f:else>
		</f:if>
	</f:for>

	<f:form.hidden name="mail[form]" value="{mail.form.uid}" class="powermail_form_uid" />
</f:section>